package com.zhuss.controller.product;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.product.site.AllSiteBo;
import com.zhuss.bean.bo.product.site.ContainSiteBo;
import com.zhuss.bean.bo.product.site.DetailSiteBo;
import com.zhuss.bean.bo.product.site.SearchSiteBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.exception.DzcxException;
import com.zhuss.product.site.SiteReadServiceExt;


/**
 * @description: 站点查询Controller
 * @author: zhushanshuo
 * @create: Wed Dec 30 08:43:41 CST 2020
 **/
@RestController
@RequestMapping("/site")
public class SiteReadController extends BaseController {

	@Autowired
	@Qualifier("siteReadService")
	private ReadService<Object, Object> siteReadService;

	@Autowired
	@Qualifier("siteReadServiceExt")
	private SiteReadServiceExt siteReadServiceExt;

	/**
	 * 详情
	 * @param bo
	 * @return
	 * @throws DzcxException
	 */
	@ResponseBody
	@RequestMapping("/detail")
    public Object detail(@RequestBody DetailSiteBo bo) throws DzcxException {

		Object result = siteReadService.detail(bo);
		return result;
    }

	/**
	 * 列表
	 * @param bo
	 * @return
	 * @throws DzcxException
	 */
	@ResponseBody
    @RequestMapping("/list")
    public Object list(@RequestBody SearchSiteBo bo) throws DzcxException {

		Object result = siteReadService.list(bo);
		return result;
    }

	/**
	 *
	 */
	@ResponseBody
	@RequestMapping("/allSite")
	public Object allSite(@RequestBody AllSiteBo bo) throws DzcxException {
		Object result = siteReadServiceExt.allSite(bo);
		return result;
	}
	
	/**
	 *
	 */
	@ResponseBody
	@RequestMapping("/containSite")
	public Object containSite(@RequestBody ContainSiteBo bo) throws DzcxException {
		Object result = siteReadServiceExt.containSite(bo);
		return result;
	}

}
